export function dateToString(date) {
  let year = date.getFullYear()
  let month = date.getMonth() + 1
  let day = date.getDate()
  return year + '-' + month + '-' + day
}

export function datetimeToString(datetime) {
  let date = dateToString(datetime)
  let hour = datetime.getHours()
  let minute = datetime.getMinutes()
  let second = datetime.getSeconds()
  return date + ' ' + hour + ':' + minute + ':' + second
}
